{{extend "layout.html"}}

{{block menu}}
{{menu('charts')}}
{{end}}

{{block content_sidebar}}
{{use "jquery", ui=True}}
{{use "jsmenu"}}

{{menu_items = []}}

{{if (((request.user.is_gm)and(request.user.department=='3')) or (request.user.is_superuser)):
    menu_items.append(
    {
    'name': 'manage',
    'title':'管理类报表',
    'subs':[
            {'name': 'work_report', 'title':'实施总体情况报表', 'link':'/charts/manage/work/total'},
            {'name': 'requirements', 'title':'准开发需求跟踪', 'link':'/charts/manage/requirements'},
            {'name': 'sum_sys_month', 'title':'系统资源投入月报表', 'link':'/charts/manage/resource/sys/month'},            
            {'name': 'sum_zx_month', 'title':'中心资源投入月报表', 'link':'/charts/manage/resource/zx/month'},            
            {'name': 'sum_type_date', 'title':'中心各类型任务资源投入报表', 'link':'/charts/manage/resource/type'},            
    #        {'name': 'assignments', 'title':'任务书列表', 'link':'/charts/manage/assignments'},
    #        {'name': 'tasks_develop', 'title':'任务列表', 'link':'/charts/manage/tasks/develop'},
            {'name': 'taskavgtime', 'title':'任务各阶段平均耗时', 'link':'/charts/manage/tasks/stage/avgtime'},
            {'name': 'requirementavgtime', 'title':'准开发需求各阶段平均耗时', 'link':'/charts/manage/requirements/stage/avgtime'},
            {'name': 'sum_selfdev_sys_month', 'title':'系统自主研发月报表', 'link':'/charts/manage/selfdev/sys/month'},            
            {'name': 'develop_test_workload', 'title':'开发任务测试工作量指标表', 'link':'/charts/manage/develop/test/workload'}, 
            {'name': 'selfdev_selfdev_if_query', 'title':'是否参与系统自主率考核设置明细表', 'link':'/selfdevs/selfdev_if/query'},            
                       
    ]})
pass
}}

{{if ((request.user.department!='3') and not (request.user.is_superuser) and not has_role(request.user,'selfdev_manager')):
    menu_items.append(
    {
    'name': 'manage',
    'title':'管理类报表',
    'subs':[
            {'name': 'work_report', 'title':'实施总体情况报表', 'link':'/charts/manage/work/total'},
            {'name': 'requirements', 'title':'准开发需求跟踪', 'link':'/charts/manage/requirements'},
            {'name': 'sum_sys_month', 'title':'系统资源投入月报表', 'link':'/charts/manage/resource/sys/month'},            
            {'name': 'sum_zx_month', 'title':'中心资源投入月报表', 'link':'/charts/manage/resource/zx/month'},            
            {'name': 'sum_type_date', 'title':'中心各类型任务资源投入报表', 'link':'/charts/manage/resource/type'},            
    #        {'name': 'assignments', 'title':'任务书列表', 'link':'/charts/manage/assignments'},
    #        {'name': 'tasks_develop', 'title':'任务列表', 'link':'/charts/manage/tasks/develop'},
            {'name': 'taskavgtime', 'title':'任务各阶段平均耗时', 'link':'/charts/manage/tasks/stage/avgtime'},
            {'name': 'requirementavgtime', 'title':'准开发需求各阶段平均耗时', 'link':'/charts/manage/requirements/stage/avgtime'},
            {'name': 'sum_selfdev_sys_month', 'title':'系统自主研发月报表', 'link':'/charts/manage/selfdev/sys/month'},            
    ]})

pass}}

{{if ((request.user.department!='3') and not (request.user.is_superuser) and has_role(request.user,'selfdev_manager')):
    menu_items.append(
    {
    'name': 'manage',
    'title':'管理类报表',
    'subs':[
            {'name': 'work_report', 'title':'实施总体情况报表', 'link':'/charts/manage/work/total'},
            {'name': 'requirements', 'title':'准开发需求跟踪', 'link':'/charts/manage/requirements'},
            {'name': 'sum_sys_month', 'title':'系统资源投入月报表', 'link':'/charts/manage/resource/sys/month'},            
            {'name': 'sum_zx_month', 'title':'中心资源投入月报表', 'link':'/charts/manage/resource/zx/month'},            
            {'name': 'sum_type_date', 'title':'中心各类型任务资源投入报表', 'link':'/charts/manage/resource/type'},            
    #        {'name': 'assignments', 'title':'任务书列表', 'link':'/charts/manage/assignments'},
    #        {'name': 'tasks_develop', 'title':'任务列表', 'link':'/charts/manage/tasks/develop'},
            {'name': 'taskavgtime', 'title':'任务各阶段平均耗时', 'link':'/charts/manage/tasks/stage/avgtime'},
            {'name': 'requirementavgtime', 'title':'准开发需求各阶段平均耗时', 'link':'/charts/manage/requirements/stage/avgtime'},
            {'name': 'sum_selfdev_sys_month', 'title':'系统自主研发月报表', 'link':'/charts/manage/selfdev/sys/month'},            
            {'name': 'selfdev_selfdev_if_query', 'title':'是否参与系统自主率考核设置明细表', 'link':'/selfdevs/selfdev_if/query'},            
    ]})

pass}}

{{if (request.user.is_superuser):}}
{{
menu_items.append({
    
    'name': 'requirements',
    'title':'准开发需求',
    'subs':[
            {'name': 'tx', 
            'title':'按条线分布', 
            'subs':[
                {'name': 'count_tx_date', 'title':'按日期查询', 'link':'/charts/requirements/count'},
                {'name': 'count_tx_month', 'title':'月报表', 'link':'/charts/requirement/month/report/tx'},
                {'name': 'count_tx_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/tx'},            
            ]
            },
            {'name': 'zx', 
            'title':'按中心分布', 
            'subs':[
                {'name': 'count_zx_date', 'title':'按日期查询', 'link':'/charts/requirements/countzx'},
                {'name': 'count_zx_month', 'title':'月报表', 'link':'/charts/requirement/month/report/kfzx'},            
                {'name': 'count_zx_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/kfzx'},            
            ]
            },
            {'name': 'sys', 
            'title':'按系统分布', 
            'subs':[
                {'name': 'count_sys_date', 'title':'按日期查询', 'link':'/charts/requirements/countsys'},
                {'name': 'countxt_sys_month', 'title':'月报表', 'link':'/charts/requirement/month/report/system'},            
                {'name': 'count_sys_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/system'},            
            ]
            },
            {'name': 'sys', 
            'title':'按阶段分布', 
            'subs':[
                {'name': 'countxt_stage_month', 'title':'月报表', 'link':'/charts/requirement/month/report/stage'},            
                {'name': 'count_stage_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/stage'},            
            ]
            },
            ]    
},)
menu_items.append(
    {
    'name': 'assignment',
    'title':'任务书分析',
    'subs':[
        {'name': 'assignment', 
        'title':'任务书中心分布', 
        'subs':[
            {'name': 'count_ass_date', 'title':'按日期查询', 'link':'/charts/assignment/date/kfzx'},
            {'name': 'countxt_ass_month', 'title':'月报表', 'link':'/charts/assignment/month/report/kfzx'},            
            {'name': 'count_ass_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/kfzx'},            
        ]
        },
        {'name': 'assignment', 
        'title':'任务书系统分布', 
        'subs':[
            {'name': 'count_ass_date_sys', 'title':'按日期查询', 'link':'/charts/assignment/date/sys'},
        ]
        },                        
        {'name':'project_stage', 
        'title':'项目阶段分析', 
        'subs':[
            {'name': 'project_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage'},            
            {'name': 'project_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage'},                        
        ]
        },
        {'name':'subproject_stage', 
        'title':'子项目阶段分析', 
        'subs':[
            {'name': 'subproject_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage/zxm'},            
            {'name': 'subproject_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage/zxm'},                        
        ]
        },
        {'name':'nproject_stage', 
        'title':'非项目任务阶段分析', 
        'subs':[
            {'name': 'nproject_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage/fxm'},            
            {'name': 'nproject_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage/fxm'},                        
        ]
        },
        ]
    },
)
menu_items.append(
    {
    'name': 'version',
    'title':'版本分析',
    'subs':[
        {'name': 'version', 
        'title':'上线版本分布', 
        'subs':[
            {'name': 'version_zx_month', 'title':'月报表', 'link':'/charts/version/month'},            
            {'name': 'version_zx_season', 'title':'季度报表', 'link':'/charts/version/season'},                        
        ]
        },
        {'name':'version_stage', 
        'title':'版本阶段分析', 
        'subs':[
            {'name': 'version_stage_month', 'title':'月报表', 'link':'/charts/version/month/report/stage'},            
            {'name': 'version_stage_season', 'title':'季度报表', 'link':'/charts/version/quarter/report/stage'},                        
        ]
        },        
        ]
    },
)

menu_items.append(
    {
    'name': 'plan',
    'title':'进度分析',
    'subs':[
        {'name':'project_delay', 
        'title':'项目异常分析', 
        'subs':[
            {'name': 'project_dalay_list', 'title':'项目列表', 'link':'/charts/plan/project/delay/list'},
            {'name': 'project_delay_month', 'title':'中心分布月报表', 'link':'/charts/assignment/month/report/kfzx/xmyc'},            
            {'name': 'project_delay_month_y', 'title':'原因分布月报表', 'link':'/charts/assignment/month/report/xmycfx'},            
              ]
        },
        {'name':'subproject_delay', 
        'title':'子项目异常分析', 
        'subs':[
            {'name': 'subproject_dalay_list', 'title':'子项目列表', 'link':'/charts/plan/subproject/delay/list'},
            {'name': 'subproject_delay_month', 'title':'中心分布月报表', 'link':'/charts/assignment/month/report/kfzx/xmyc/zxm'},            
            {'name': 'subproject_delay_month_y', 'title':'原因分布月报表', 'link':'/charts/assignment/month/report/xmycfx/zxm'},            
        ]
        },
        {'name':'nproject_delay', 
        'title':'非项目任务异常分析', 
        'subs':[
            {'name': 'nproject_dalay_list', 'title':'非项目列表', 'link':'/charts/plan/nproject/delay/list'},
            {'name': 'nproject_delay_month', 'title':'中心分布月报表', 'link':'/charts/assignment/month/report/kfzx/xmyc/fxm'},            
            {'name': 'nproject_delay_month_y', 'title':'原因分布月报表', 'link':'/charts/assignment/month/report/xmycfx/fxm'},            
        ]
        },
        {'name':'version_delay', 
        'title':'版本异常分析', 
        'subs':[
            {'name': 'version_dalay_list', 'title':'版本列表', 'link':'/charts/plan/version/delay/list'},
            {'name': 'version_delay_month', 'title':'中心分布月报表', 'link':'/charts/version/month/report/kfzx/bbyc'},            
            {'name': 'version_delay_month', 'title':'原因分布月报表', 'link':'/charts/version/month/report/bbycfx'},            
        ]
        },        
        {'name':'version_plan_change_rate', 
        'title':'版本计划变更率', 
        'subs':[
            {'name': 'plan_suggestive', 'title':'提示级', 'link':'/charts/plan/version/change/suggestive'},
            {'name': 'plan_notice', 'title':'通报级', 'link':'/charts/plan/version/change/notice'},            
            {'name': 'plan_involved', 'title':'介入级', 'link':'/charts/plan/version/change/involved'},            
        ]
        },        
        {'name':'version_target_change_rate', 
        'title':'版本目标变更率', 
        'subs':[
            {'name': 'target_notice', 'title':'通报级', 'link':'?????'},            
            {'name': 'target_involved', 'title':'介入级', 'link':'?????'},            
        ]
        },        
        ]
    }
)
menu_items.append(
{
'name': 'resource',
'title':'资源分析',
'subs':[
    {'name': 'zx', 
    'title':'按中心分布', 
    'subs':[
        {'name': 'sum_zx_date', 'title':'按日期查询', 'link':'/charts/resource/zx/date'},
        {'name': 'sum_zx_month', 'title':'月报表', 'link':'/charts/resource/zx/month'},            
        {'name': 'sum_zx_season', 'title':'季度报表', 'link':'/charts/resource/zx/season'},            
    ]
    },
    {'name': 'sys', 
    'title':'按系统分布', 
    'subs':[
        {'name': 'sum_sys_date', 'title':'按日期查询', 'link':'/charts/resource/sys/date'},
        {'name': 'sum_sys_month', 'title':'月报表', 'link':'/charts/resource/sys/month'},            
        {'name': 'sum_sys_season', 'title':'季度报表', 'link':'/charts/resource/sys/season'},            
    ]
    },
    {'name': 'tx', 
    'title':'按条线分布', 
    'subs':[
        {'name': 'sum_tx_date', 'title':'按日期查询', 'link':'/charts/resource/tx/date'},
        {'name': 'sum_tx_month', 'title':'月报表', 'link':'/charts/resource/tx/month'},            
        {'name': 'sum_tx_season', 'title':'季度报表', 'link':'/charts/resource/tx/season'},            
    ]
    },
    {'name': 'type', 
    'title':'按类型分布', 
    'subs':[
        {'name': 'sum_type_date', 'title':'按日期查询', 'link':'/charts/resource/type/date'},
        {'name': 'sum_type_month', 'title':'月报表', 'link':'/charts/resource/type/month'},            
        {'name': 'sum_type_season', 'title':'季度报表', 'link':'/charts/resource/type/season'},            
    ]
    },    
    {'name': 'stage', 
    'title':'按阶段分布', 
    'subs':[
        {'name': 'sum_stage_date', 'title':'按日期查询', 'link':'/charts/resource/stage/date'},
        {'name': 'sum_stage_month', 'title':'月报表', 'link':'/charts/resource/stage/month'},            
        {'name': 'sum_stage_season', 'title':'季度报表', 'link':'/charts/resource/stage/season'},            
    ]
    },    
    {'name':'time',
    'title':'时间消耗统计', 
    'subs':[
        {'name': 'time_req', 'title':'需求', 'link':'/charts/resource/time/requirement'},
        {'name': 'time_project', 'title':'项目/子项目', 'link':'/charts/resource/time/project'},                    
        {'name': 'time_nproject', 'title':'非项目任务', 'link':'/charts/resource/time/nproject'},            
        {'name': 'time_version', 'title':'版本', 'link':'/charts/resource/time/version'},            
    ]
    },    
    
    {'name':'release', 'title':'项目瓶颈分析', 'link':'/config/users/list'},
    ]
}
)

menu_items.append(
{
'name': 'independent',
'title':'自主研发分析',
'subs':[
        {'name': 'zzyf_xt', 'title':'系统自主率', 'link':'/charts/resource/independent/sys/date'},
        {'name': 'zzyf_zx', 'title':'中心自主率', 'link':'/charts/resource/independent/zx/date'},            
]})

menu_items.append(
{
'name': 'tasks_manager',
'title':'在建开发任务分析',
'subs':[
        {'name': 'tx', 'title':'按条线分布', 'link':'/charts/manager/tasks/tx'},
        {'name': 'zx', 'title':'按中心分布', 'link':'/charts/manager/tasks/zx'}, 
        {'name': 'work_report_zx', 'title':'中心实施情况考核', 'link':'/charts/manage/zx/total'},
        {'name': 'nproject_message', 'title':'消息', 'link':'/charts/message'},                        
                   
]})

}}


{{pass}}

{{if ((request.user.is_gm)and(request.user.department=='2')):}}
{{
menu_items.append({
    
    'name': 'requirements',
    'title':'中心准开发需求统计',
    'subs':[
            {'name': 'sys', 
            'title':'按系统分布', 
            'subs':[
                {'name': 'count_sys_date', 'title':'按日期查询', 'link':'/charts/requirements/countsys'},
                {'name': 'countxt_sys_month', 'title':'月报表', 'link':'/charts/requirement/month/report/system'},            
                {'name': 'count_sys_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/system'},            
            ]
            },
            {'name': 'sys', 
            'title':'按阶段分布', 
            'subs':[
                {'name': 'countxt_stage_month', 'title':'月报表', 'link':'/charts/requirement/month/report/stage'},            
                {'name': 'count_stage_season', 'title':'季度报表', 'link':'/charts/requirement/quarter/report/stage'},            
            ]
            },
            ]    
},)
menu_items.append(
    {
    'name': 'assignment',
    'title':'中心任务书分析',
    'subs':[
        {'name': 'assignment', 
        'title':'任务书系统分布', 
        'subs':[
            {'name': 'count_ass_date_sys', 'title':'按日期查询', 'link':'/charts/assignment/date/sys'},
        ]
        },                        
        {'name':'project_stage', 
        'title':'项目阶段分析', 
        'subs':[
            {'name': 'project_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage'},            
            {'name': 'project_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage'},                        
        ]
        },
        {'name':'subproject_stage', 
        'title':'子项目阶段分析', 
        'subs':[
            {'name': 'subproject_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage/zxm'},            
            {'name': 'subproject_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage/zxm'},                        
        ]
        },
        {'name':'nproject_stage', 
        'title':'非项目任务阶段分析', 
        'subs':[
            {'name': 'nproject_stage_month', 'title':'月报表', 'link':'/charts/assignment/month/report/stage/fxm'},            
            {'name': 'nproject_stage_season', 'title':'季度报表', 'link':'/charts/assignment/quarter/report/stage/fxm'},                        
        ]
        },
        ]
    },
)

}}


{{pass}}
{{
menu_items.append(
{
'name': 'risks',
'title':'风险整改',
'subs':[
        {'name': 'riskpoint_executing', 'title':'整改措施执行情况统计表', 'link':'/charts/riskpoint/current/executing'},
        {'name': 'risksolution_status', 'title':'整改措施完成情况统计表', 'link':'/charts/risksolution/status/counting'},            
        {'name': 'risksolution_level_urgency', 'title':'风险级别与整改紧迫程度统计表', 'link':'/charts/risksolution/level/urgency'},            
        {'name': 'risksolution_kfzx_policy', 'title':'按策略名称维度统计表', 'link':'/charts/risksolution/kfzx/policy'},            
        {'name': 'risksolution_kfzx_system', 'title':'按系统名称维度统计表', 'link':'/charts/risksolution/kfzx/system'},            
]})
}}
{{  
menu_items.append(
    {
    'name': 'weekreport',
    'title':'周报',
    'link':'/weekreport/list',
    }
)
}}


{{ 
if (((request.user.is_gm)and(request.user.department=='2')) or (request.user.is_superuser)): 
menu_items.append(
    {
    'name': 'weekreport_check',
    'title':'周报填写情况统计',
    'link':'/charts/weekreport/integrity/check/report',
    }
)

}}
{{pass}}
{{
if ((request.user.department=='2') or (request.user.is_superuser)): 
menu_items.append(
    {
    'name': 'plan_desc_query',
    'title':'本周计划执行情况明细查询',
    'link':'/charts/weekreport/current/week/desc/query',
    }
)

}}
{{pass}}
{{
if request.user.is_superuser:
    menu_items.append(
        {
        'name': 'req_stage_change_query',
        'title':'准开发需求阶段变更查询',
        'link':'/charts/requirement/change/week/query',
        }
        )
}}
{{pass}}    
<div class="sidebar">
    {{block sub_menu}}
    {{sub_menu(menu_items, 'requirements', 'information')}}
    {{end}}
</div>
{{end}}
